Find and replace inside a string variable using sed command - shell scripting